package org.micode.demo.web.service;

import org.micode.common.domain.DataPage;
import org.micode.common.domain.vo.KeyVO;
import org.micode.demo.db.domain.dto.LogSysDTO;
import org.micode.demo.db.domain.query.LogSysQuery;
import org.micode.demo.db.service.DaoLogSysService;
import lombok.extern.slf4j.Slf4j;
import org.springframework.beans.factory.annotation.Autowired;
import org.springframework.stereotype.Service;

/**
 * 系统日志(log_sys) 的APP服务实现类
 *
 * author: wutianbin
 */
@Service
@Slf4j
public class LogSysService {

    @Autowired
    private DaoLogSysService daoLogSysService;

    public DataPage<LogSysDTO> list(LogSysQuery dataQuery) {
        return daoLogSysService.listPage(dataQuery);
    }

    public LogSysDTO info(KeyVO<Long> logId) {
        return daoLogSysService.get(logId.getKey());
    }

    public LogSysDTO insert(LogSysDTO logSysDTO) {
        return daoLogSysService.insert(logSysDTO);
    }

}
